package chapter04.Example14.Example18;

class Animal {
    void shout(){
        System.out.println("动物叫！");
    }
    public String  toString(){
        return "这是一个动物类";
    }
}
public class Example18 {
    public static void main(String[] args){
        Animal animal = new Animal();
        System.out.println(animal.toString());
    }
}
